#pragma once
#include "precompiled.h"
#include "Common.h"
#include "RenderDefines.h"

class Camera_Alt;

class Gun
{
public:
	Gun(void);
	~Gun(void);

	void Initialize( float barrel_length );

	// Rotate and Translate the gun into view.
	void TransformToView( glm::mat4 const &view, glm::vec4 &player_position,
	glm::vec3 &mouse_aim, glm::vec3 const &viewDir, glm::vec3 const &cam_hpr );


	// Submit the request to draw this object.
	void Submit_Ticket( Camera_Alt* cam );

	// Get.
	glm::vec3 const get_AimFrom() const;
	glm::vec3 const get_AimTo() const;
	glm::vec3 const get_butt() const;
	glm::vec3 const get_head() const;

private:

	void TransformToView_Blaster( glm::mat4 const &view, glm::vec4 &player_position,
		glm::vec3 &mouse_aim, glm::vec3 const &viewDir, glm::vec3 const &cam_hpr );

	TransformationCore transform;
	glm::vec3 gun_forward;

	std::string model_key;

	RenderTicket rticket;

	glm::vec4 head, butt;
};

